package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabFeeitemVsItemDict;
import com.ysd.lis.request.DeleteParam;
import com.ysd.lis.request.lab.LabFeeitemVsItemDictDto;
import com.ysd.lis.service.lab.LabFeeitemVsItemDictService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author
 * @since 2023-12-16
 */
@RestController
@RequestMapping("/api/LabFeeitemVsItemdict")
public class LabFeeitemVsItemdictController extends BaseController {
    @Autowired
    LabFeeitemVsItemDictService labFeeitemVsItemDictService;

    @ApiOperation("根据申请项目获取对应的报告项目")
    @GetMapping("/findItemDictListByFeeId")
    public Result findItemDictListByFeeId(String feeCode,String rptGroup) {
        return labFeeitemVsItemDictService.findItemDictListByFeeId(feeCode,rptGroup);
    }


    @ApiOperation("添加对照关系")
    @PostMapping("/addFeeItemVsItemDict")
    public Result addFeeItemVsItemDict(@RequestBody LabFeeitemVsItemDict labFeeitemVsItemDict) {
        return labFeeitemVsItemDictService.addFeeItemVsItemDict(labFeeitemVsItemDict);
    }

    @ApiOperation("删除对照关系")
    @PostMapping("/deleteFeeitemVsItemdict")
    public Result deleteFeeitemVsItemdict(@RequestBody DeleteParam deleteParam) {
        return labFeeitemVsItemDictService.deleteFeeitemVsItemdict(deleteParam);
    }

    @ApiOperation("获取报告项目信息")
    @GetMapping("/findDictItemByFeeItemId")
    public Result findDictItemByFeeItemId(String feeCode,String rptGroup, String keyWords,Long pageSize,Long pageIndex) {
        return labFeeitemVsItemDictService.findDictItemByFeeItemId(feeCode,rptGroup,keyWords,pageSize,pageIndex);
    }
    @ApiOperation("修改")
    @PostMapping("/saveBatchFeeItemVsItemDict")
    public Result saveBatchFeeItemVsItemDict(@RequestBody LabFeeitemVsItemDictDto dto) {
        return labFeeitemVsItemDictService.saveBatchFeeItemVsItemDict(dto);
    }



}
